<?php
require_once PATH_NAME .'/utilities/sessions.php';
require_once PATH_NAME .'/views/contact/contact.php';
require_once PATH_NAME .'/includes/access.php';
require_once PATH_NAME .'/models/contact/contact.php';
class contactController{
	
	public function __construct(){}
	
	public function showContactByCustomer(){
		$user = sessions::getSession();		
		$contact = new contactView();		
		$contactModel = new contactModel();
		
		$limit = '';
		$lists['posts'] = $contactModel->getPosts(  );
		$lists['contact'] = $contactModel->showContactByCustomer( $user['user_id'], $limit );			
		$contact->showContactByCustomer( $lists );
	}
	
	public function showContactList(){
		$user = sessions::getSession();		
		$contact = new contactView();		
		$contactModel = new contactModel();
		
		$limit = '';
		$listsContact = $contactModel->showContactLists( $user['user_id'], $limit );		
		$contact->showContactList( $listsContact );
	}
}
?>